<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue3基础语法</title>
</head>

<body>
    <p>methods方法</p>
    <div id="app"></div>
</body>
<script src="../libs/vue.global.min.js"></script>
<script>
    const app = Vue.createApp({
        data() {
            return {
                count: 4
            }
        },
        methods: {
            increment() {
                this.count++
            }
        }
    })

    const vm = app.mount("#app")

    document.write(vm.count)    // 4
    document.write("<br>")
    vm.increment()

    document.write(vm.count)    // 5

</script>

</html>